package org.jeecg.modules.car.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.model.car.reqvo.CarDayReportReqVo;
import org.jeecg.model.car.respvo.CarDayReportRespVo;
import org.jeecg.entity.car.CarDerateDetails;
import org.jeecg.modules.car.entity.CarMerchant;
import org.jeecg.modules.car.entity.CarMerchantOrder;

import java.util.Date;
import java.util.List;

/**
 * @Description: 商户充值明细
 * @Author: jeecg-boot
 * @Date:   2020-10-21
 * @Version: V1.0
 */
public interface CarMerchantOrderMapper extends BaseMapper<CarMerchantOrder> {

    int updatePayStatus(@Param("sn") String sn,@Param("payTime") Date payTime,@Param("response") String response);

    CarMerchantOrder getOrderBySn(@Param("sn") String sn);

    List<CarMerchantOrder> findByMerChantById(@Param("merChantId") String merChantId);

    CarMerchantOrder getOrderByTransNo(@Param("transNo") String transNo);

    List<CarMerchantOrder> findPage(Page<CarMerchantOrder> page, @Param("carMerchantOrder") CarMerchantOrder carMerchantOrder);

    List<CarDayReportRespVo> findGroupList(@Param("reportReq") CarDayReportReqVo carDayReportReqVo);

    List<CarDerateDetails> findDiscountListByMerChantById(Page<CarDerateDetails> page, @Param("carMerchant") CarMerchant carMerchant);

    @SqlParser(filter = true)
    List<CarMerchantOrder> findMerchantOrderList(Page<CarMerchantOrder> page, @Param("carMerchant") CarMerchant carMerchant);
}
